package com.kgc.ssm.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        /**
         *  公共配置
         */
        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/register.html").setViewName("register");
        registry.addViewController("/index.html").setViewName("index");
        registry.addViewController("/mainRequire.html").setViewName("mainRequire");
        registry.addViewController("/leftRequire.html").setViewName("leftRequire");
        registry.addViewController("/bar.html").setViewName("bar");

        /**
         *  计划员配置
         */
        registry.addViewController("/planman/Project_list2.htm").setViewName("planman/Project_list2");
        registry.addViewController("/planman/Project_list.html").setViewName("planman/Project_list");
        registry.addViewController("/supplyman/Order_wbxjfa_list.html").setViewName("/supplyman/Order_wbxjfa_list");
        registry.addViewController("/supplyman/Project_list.html").setViewName("/supplyman/Project_list");
        registry.addViewController("/Project_list.html").setViewName("queryandqueto/Project_list");
        registry.addViewController("/pclass_select.html").setViewName("planman/pclass_select");
        registry.addViewController("/planman/pclass_select.html").setViewName("planman/pclass_select");
        registry.addViewController("/pclass_select.html").setViewName("planman/pclass_select");
        registry.addViewController("/Order_wbxjfa_list.html")
                .setViewName("planman/Order_wbxjfa_list");
        registry.addViewController("/planman/Order_wbxjfa_list.html")
                .setViewName("planman/Order_wbxjfa_list");
        // 配置 /planman/Project_list.html 的视图控制器
        registry.addViewController("/Project_list.html")
                .setViewName("planman/Project_list");
        // 配置 /planman/Project_list2.html 的视图控制器
        registry.addViewController("/Project_list2.html")
                .setViewName("planman/Project_list2");
        // 配置 /planman/Project_list3.html 的视图控制器
        registry.addViewController("/Project_list3.html")
                .setViewName("planman/Project_list3");
        // 配置 /planman/Project_list4.html 的视图控制器
        registry.addViewController("/Project_list4.html")
                .setViewName("planman/Project_list4");
        // 配置 /planman/Project_list5.html 的视图控制器
        registry.addViewController("/Project_list5.html")
                .setViewName("planman/Project_list5");
        // 配置 /planman/provider_cx.html 的视图控制器
        registry.addViewController("/provider_cx.html")
                .setViewName("planman/provider_cx");
        // 配置 /planman/Apply_Exam.html 的视图控制器
        registry.addViewController("/Apply_Exam.html")
                .setViewName("planman/Apply_Exam");
        // 配置 /planman/supply.html 的视图控制器
        registry.addViewController("/supply.html")
                .setViewName("planman/supply");
        // 配置 /planman/category.html 的视图控制器
        registry.addViewController("/category.html")
                .setViewName("planman/category");
        registry.addViewController("/Order_ytb_list.html")
                .setViewName("planman/Order_ytb_list");
        registry.addViewController("/xjfatz_xjfamx.html")
                .setViewName("planman/xjfatz_xjfamx");
        registry.addViewController("/Order_newform.html")
                .setViewName("planman/Order_newform");
        /**
         * 部门领导配置
         */
        //配置leader审批页面
        registry.addViewController("Apply_daishencaiwu.html").setViewName("/contractmanager/Apply_daishencaiwu");
        registry.addViewController("Apply_daishenjihua.html").setViewName("/contractmanager/Apply_daishenjihua");

        registry.addViewController("Apply_list_do.html").setViewName("/contractmanager/Apply_list_do");
        registry.addViewController("Apply_caiwushenpi.html").setViewName("/contractmanager/Apply_caiwushenpi");
        registry.addViewController("Apply_jihuashenpi.html").setViewName("/contractmanager/Apply_jihuashenpi");

        registry.addViewController("Apply_caiwushenpi2.html").setViewName("/contractmanager/Apply_caiwushenpi2");
        registry.addViewController("Apply_list_do2.html").setViewName("/contractmanager/Apply_list_do2");
        registry.addViewController("jindulist.html").setViewName("/contractmanager/jindulist");

        /**
         * 采购员配置
         */
        registry.addViewController("/supplyman/Order_wbxjfa_list.html").setViewName("/supplyman/Order_wbxjfa_list");
        registry.addViewController("/supplyman/Project_list.html").setViewName("/supplyman/Project_list");
        registry.addViewController("/queryandqueto/ask1.html").setViewName("/queryandqueto/ask1");
        registry.addViewController("/queryandqueto/Enquire_xjsmx.html").setViewName("/queryandqueto/Enquire_xjsmx");
        registry.addViewController("/queryandqueto/baojaoshushuoming.html").setViewName("/queryandqueto/baojaoshushuoming");
        registry.addViewController("/queryandqueto/Enquire_update.html").setViewName("/queryandqueto/Enquire_update");
        registry.addViewController("/contractmanager/jieshilist.html").setViewName("/contractmanager/jieshilist");
        registry.addViewController("/contractmanager/Apply_xjsmx.html").setViewName("/contractmanager/Apply_xjsmx");
        /**
         * 供应商配置
         */
        registry.addViewController("/Project_list.html").setViewName("queryandqueto/Project_list");
        // 配置 /queryandqueto/Enquire_bianzhi.html 的视图控制器
        registry.addViewController("Enquire_bianzhi.html").setViewName("queryandqueto/Enquire_bianzhi");
        // 配置 图片资源等
        registry.addViewController("/queryandqueto/img/**").setViewName("/queryandqueto/img/**");
        registry.addViewController("/supplyman/QuotationHistory.html").setViewName("/supplyman/QuotationHistory");
        registry.addViewController("/supplyman/ModifyPublicPurchaseQuote.html").setViewName("/supplyman/ModifyPublicPurchaseQuote");
    }
}
